package com.hkemmm.bean;

import java.util.List;

public class Blog {
    private Integer id;
    private String title;
    private Integer author_id;

    //一对一外连接
    private Author author;

    //一对多外连接
    private List<Post> lstPost;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Integer getAuthor_id() {
        return author_id;
    }

    public void setAuthor_id(Integer author_id) {
        this.author_id = author_id;
    }

    public Author getAuthor() {
        return author;
    }

    public void setAuthor(Author author) {
        this.author = author;
    }

    public List<Post> getLstPost() {
        return lstPost;
    }

    public void setLstPost(List<Post> lstPost) {
        this.lstPost = lstPost;
    }

    @Override
    public String toString() {
        return "Blog{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", author_id=" + author_id +
                ", author=" + author +
                ", lstPost=" + lstPost +
                '}';
    }
}
